//
//  HeaderCollectionViewCell.m
//  礼物go
//
//  Created by dllo on 16/5/18.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "HeaderCollectionViewCell.h"


@implementation HeaderCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    return self;
}

-(void)createSubviews{
    self.backImageView = [[UIImageView alloc] initWithFrame:self.contentView.bounds];
    [self.contentView addSubview:self.backImageView];
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.backImageView.frame = self.contentView.bounds;
    
}

-(void)setSecondary:(SecondaryCollectionModel *)secondary{
    _secondary = secondary;
   
    [self.backImageView sd_setImageWithURL:[NSURL URLWithString:_secondary.image_url] placeholderImage:[UIImage imageNamed:@"picholder.png"]];
    
}


@end
